﻿using System.Collections.Generic;
using System.Data.Linq;
using System.Linq;
using sBlog.Net.Domain.Entities;
using sBlog.Net.Domain.Interfaces;

namespace sBlog.Net.Domain.Concrete
{
    public class TagMapping : DefaultDisposable, ITagMapping
    {
        private readonly Table<TagMappingEntity> _tagMappingTable;

        public TagMapping()
        {
            _tagMappingTable = context.GetTable<TagMappingEntity>();
        }

        public List<TagMappingEntity> GetMostTag()
        {
            return _tagMappingTable.ToList();
        }

        ~TagMapping()
        {
            Dispose(false);
        }
    }
}
